package cn.kgc.springboot.controller;

import cn.kgc.springboot.entity.User;
import cn.kgc.springboot.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.*;

/**
 * @author 课工场
 * @date 2023/11/13
 * @description
 */
@RestController
@RequestMapping("users")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping
    public List<User> getList(){

        return userService.list();
    }


    @GetMapping("a")
    public Map<String ,Object> getList2(){

        HashMap<String, Object> map = new HashMap<>();



        return map;
    }
}
